body {
    margin: 0;
    padding: 0;
    height: 70vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}

.container {
    text-align: center;
    width: 30%;
}

.logo {
    margin-bottom: 10px;
}

.logo img {
    max-height: 40px;
    width: auto;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 900px; /* 增加最大宽度 */
    margin: 0 auto;
    position: relative;
}

#engineSelect {
    height: 46px;
    border-radius: 23px 0 0 23px;
    border: 1px solid #dfe1e5;
    outline: none;
    font-size: 16px;
    padding: 0 16px;
    background: #fff;
    margin-right: -1px;
}

#searchInput {
    flex: 1;
    height: 46px; /* 稍微增加高度 */
    border-radius: 0 23px 23px 0;
    border: 1px solid #dfe1e5;
    border-left: none;
    padding: 0 30px; /* 增加左右内边距 */
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
}

#searchInput:hover,
#searchInput:focus {
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    border-color: rgba(223,225,229,0);
}

.search-buttons {
    margin-top: 30px; /* 增加与搜索框的间距 */
}

button {
    background-color: #f8f9fa;
    border: 1px solid #f8f9fa;
    border-radius: 4px;
    color: #3c4043;
    font-size: 14px;
    margin: 11px 4px;
    padding: 0 16px;
    height: 36px;
    cursor: pointer;
}

button:hover {
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    color: #202124;
}

.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(6px);
    text-align: center;
    padding: 18px 0 10px 0;
    font-size: 15px;
    color: #666;
    z-index: 10;
    box-shadow: 0 -2px 16px 0 rgba(0,0,0,0.06);
    transition: background 0.3s;
}

.footer:hover {
    background: rgba(250, 250, 250, 0.97);
}

.footer .time {
    margin-top: 6px;
    font-size: 15px;
    color: #333;
    letter-spacing: 1px;
}

.footer .quote {
    margin: 6px 0 0 0;
    color: #1976d2;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.2s;
}

.footer .quote:hover {
    color: #1565c0;
}

.footer .copyright {
    font-size: 13px;
    color: #aaa;
    margin-top: 8px;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .footer {
        font-size: 13px;
        padding: 12px 0 6px 0;
    }
    .footer .quote {
        font-size: 14px;
    }
    .footer .copyright {
        font-size: 12px;
    }
}

/* 收藏网站区域 */
.favorites {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.favorite {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 默认图标样式 */
.favorite .icon {
    width: 50px;
    height: 50px;
    background-color: #dfe1e5;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* 针对自定义收藏添加相对定位，用于放置编辑按钮 */
.favorite.custom {
    position: relative;
}

/* 编辑按钮初始隐藏，悬浮时显示 */
.edit-btn {
    display: none;
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    padding: 2px 6px;
    cursor: pointer;
    min-width: 30px; /* 增加最小宽度 */
    white-space: nowrap; /* 避免自动换行 */
}

/* 鼠标悬浮在收藏上显示编辑按钮 */
.favorite.custom:hover .edit-btn {
    display: block;
}

/* Modal 样式 */
.modal {
    display: none; /* 默认隐藏 */
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    min-width: 300px;
}

.modal-content h3 {
    margin-top: 0;
}

.modal-content label {
    display: block;
    margin: 10px 0 4px;
}

.modal-content input {
    width: 100%;
    padding: 6px 8px;
    box-sizing: border-box;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 泡泡背景样式 */
.bubble-bg {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0,191,255,0.55), rgba(0,191,255,0.25) 60%, rgba(255,255,255,0.18) 100%);
    border: 2px solid rgba(0,191,255,0.45);
    pointer-events: auto;
    transition: transform 0.3s, opacity 0.3s, box-shadow 0.3s;
    will-change: transform, opacity;
    box-shadow: 0 4px 24px 0 rgba(0,191,255,0.18), 0 0 0 4px rgba(0,191,255,0.08) inset;
    /* 移除CSS动画，改为JS驱动 */
}

/* 泡泡碎片样式 */
.bubble-frag {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    opacity: 0.85;
    animation: fragBurst 0.7s cubic-bezier(0.42,0,0.58,1) forwards;
    transform: translate(-50%, -50%) scale(1);
    will-change: transform, opacity;
}
@keyframes fragBurst {
    0% {
        opacity: 0.85;
        transform: translate(-50%, -50%) scale(1);
    }
    60% {
        opacity: 1;
        transform: translate(calc(-50% + var(--frag-x)), calc(-50% + var(--frag-y))) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--frag-x)), calc(-50% + var(--frag-y))) scale(0.7);
    }
}